#ifndef CALCULATOR_H
#define CALCULATOR_H

#include "dispatcher/LaserListener.h"
#include "database/TrackBase.h"
#include "model/MappedRecognizer.impl.h"

#include <string>

class Calculator : public LaserListener {
private:
	MappedRecognizer<std::string> rec;
	std::string expr;
public:
	Calculator(std::string baseDir);
	void isInterval(const LaserEvent& e);
	void isTrack(const LaserEvent& e);
	int evaluate() const;
	static int evaluate(std::string expr);
};

#endif
